import request from '@/utils/request'


/* 分页查询 */
export function getHospSetList(current,limit,searchObj) {
  return request({
    url: `admin/hosp/hospitalSet/toPage/${current}/${limit}`,
    method: 'post',
    data: searchObj
  })
}

/* 根据id删除 */
export function deleteHospSet(id) {
  return request({
    url: `admin/hosp/hospitalSet/delete/${id}`,
    method: 'delete',
  })
}

/* 批量删除 */
export function batchHospSet(idList) {
  return request({
    url: `admin/hosp/hospitalSet/batchDelete`,
    method: 'delete',
    data: idList
  })
}

/* 医院设置锁定和解锁 */
export function lockHospSet(id,status) {
  return request({
    url: `admin/hosp/hospitalSet/isLock/${id}/${status}`,
    method: 'put',
  })
}

/* 医院设置添加 */
export function addHospSet(hospitalSet) {
  return request({
    url: `admin/hosp/hospitalSet/add`,
    method: 'post',
    data: hospitalSet
  })
}

/* 医院id查询 */
export function selectHospSet(id) {
  return request({
    url: `admin/hosp/hospitalSet/findOne/${id}`,
    method: 'get',
  })
}

/* 医院设置修改 */
export function editHospSet(hospitalSet) {
  return request({
    url: `admin/hosp/hospitalSet/upDate`,
    method: 'post',
    data: hospitalSet
  })
}

/* export default({
  getHospSetList(current,limit,searchObj){
    return request({
      url: `admin/hosp/hospitalSet/${current}/${limit}`,
      method: 'post',
      data: searchObj
    })
  }
}) */
